#include <vector>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <utility>
#include<map>
#include <unordered_map>
#include <iostream>
using namespace std;

double buTaiExpect(vector<double> weight);

void linearRegression(const std::vector<double>& x, const std::vector<double>& y, double& slope, double& intercept);

double calculateRMSE(const std::vector<double>& observed, const std::vector<double>& predicted);

bool customCompare(const pair<double, double>& key1, const pair<double, double>& key2);

pair<double , double> getWeightItem(vector<double> Wc);

vector<double> sfim(vector<double> avg);